﻿using System.ComponentModel.DataAnnotations;

namespace FlyingHat.Core.Entities
{
    /// <summary>
    /// 基础类
    /// </summary>
    public class BaseEntity
    {
        [Key]
        public long Id { get; set; }
    }
    /// <summary>
    /// 基础创建
    /// </summary>
    public class CreateEntity : BaseEntity
    {
        public long CreatedUserId { get; set; } = 0;
        public DateTime CreatedTime { get; set; } = DateTime.Now;
    }
    /// <summary>
    /// 基础修改
    /// </summary>
    public class ModifyEntity : CreateEntity
    {

        public long ModifyUserId { get; set; }
        /// <summary>
        /// 默认和创建时间等同
        /// </summary>
        public DateTime ModifyTime { get; set; } = DateTime.Now;
    }
}
